from appium.webdriver.common.appiumby import AppiumBy

from base.authorize import AuthorizeBase
from appium.webdriver import Remote

class AuthorizePage(AuthorizeBase):
    def privacy_agree_button_click(self,driver:Remote):
        privacy_agree_button_xpash = self.privacy_agree_button()
        return self.click_new(driver,AppiumBy.XPATH, privacy_agree_button_xpash)
    def authorize_agree_button_click(self,driver:Remote):
        authorize_agree_button_xpash=self.authorize_agree_button()
        return self.click_new(driver, AppiumBy.XPATH, authorize_agree_button_xpash)

    def ad_close_button_click(self,driver:Remote):
        ad_close_button_xpash=self.ad_close_button()
        return self.click_new(driver, AppiumBy.XPATH, ad_close_button_xpash)

    def authorize_setup(self,drive):
        self.privacy_agree_button_click(drive)
        self.authorize_agree_button_click(drive)
        self.ad_close_button_click(drive)
